package monitor

import (
	"gitee.com/crack007/go_log"
	"github.com/crack007/fpm_metrics/src/config"
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"net/http"
)

func NewPrometheus() {
	host := config.GetPrometheusHost()
	go_log.Warn("Prometheus start-> %s", host)
	serveMux := http.NewServeMux()
	serveMux.Handle("/metrics", promhttp.Handler())
	go_log.Error(http.ListenAndServe(host, serveMux).Error())

}
